﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfAgentDjackOrderList.aspx.cs" Inherits="msBsc.WebUi.wMall.Seller.wfAgentDjackOrderList" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客_订单列表</title>
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/from.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/pagination.css" rel="stylesheet" />

    <link href="/themes/wStyle1/css/orderlist.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/usermenu.css" rel="stylesheet" />

    <link href="/jqPlugin/layer/skin/layer.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Chat/layim.css" rel="stylesheet" />
</head>
<body>
    <div class="wf_all">
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div class="main-container">
            <div class="sidebar-scroll noborder">
                <%=msBsc.WebUi.Code.QtHtmlGet.GetAgentDjackMenuHtml() %>
            </div>
            <div class="main-Info">
                <div class="listmenu">
                    <ul id="wSlist" class="list">
                        <li class="selected" onclick="selectStatus(this,0);" tabindex="0">
                            <a class="link" data-spm="d2" href="javascript:;">
                                <span>所有订单</span>
                                <em class="tm-h">0</em>
                                <i class="interval">|</i>
                            </a>
                        </li>
                        <li onclick="selectStatus(this,1);" tabindex="1">
                            <a class="link" data-spm="d2" href="javascript:;">
                                <span>已付款</span>
                                <em class="tm-h">0</em>
                                <i class="interval">|</i>
                            </a>
                        </li>
                        <li onclick="selectStatus(this,2);" tabindex="2">
                            <a class="link" data-spm="d2" href="javascript:;">
                                <span>已完成</span>
                                <em class="tm-h">0</em>
                                <i class="interval">|</i>
                            </a>
                        </li>
                        <li onclick="selectStatus(this,3);" tabindex="3">
                            <a class="link" data-spm="d2" href="javascript:;">
                                <span>已结算</span>
                                <em class="tm-h">0</em>
                                <i class="interval">|</i>
                            </a>
                        </li>
                        <li onclick="selectStatus(this,4);" tabindex="4">
                            <a class="link" data-spm="d2" href="javascript:;">
                                <span>已退款</span>
                                <em class="tm-h">0</em>
                                <i class="interval">|</i>
                            </a>
                        </li>
                    </ul>
                    <div class="wrap-line">
                        <span id="sold-boder" class="line" style="left: 0px;"></span>
                    </div>
                </div>
                <div style="margin-left: -5px;" id="orderList">
                    <p style="width: 200px; margin-left: 30px;" class="car-price">数据加载中请稍后...</p>
                </div>
                <xmp id="svc_list_temp_order" style="display: none">
                    {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                       <table class="table-info m-top1">
                        <thead class="table-head">
                            <tr>
                                <th class="w2">下单时间:{{formatDate1(new Date(d.rows[i].ORDER_TIME))}}</th>
                                <th class="w2">订单编号:{{d.rows[i].ORDER_CODE}}</th>
                                <th class="w2" style="width:22%">
                                    <a href="#" title="getNick({{d.rows[i].TOURIST_NAME}},{{d.rows[i].TOURIST_GENDER}})">getNick({{d.rows[i].TOURIST_NAME}},{{d.rows[i].TOURIST_GENDER}})</a>
                                </th>
                                <th style="width:15%">金额(元)</th>
                                <th>状态</th>
                            </tr>
                        </thead>
                        <tbody class="car-body">
                            <tr>
                                <td>
                                    联系电话:{{d.rows[i].TOURIST_PHONE}}
                                </td>
                                <td class="center-text">{{formatDate1(new Date(d.rows[i].ORDER_START_TIME))}}--{{formatDate1(new Date(d.rows[i].ORDER_STOP_TIME))}}</td>
                                <td class="center-text pric-boder">
                                    <p >定金金额:<span class="car-price">￥{{d.rows[i].ORDER_DEPOSIT}}</span></p>
                                    <p >订单总额:<span class="car-price">￥{{d.rows[i].ORDER_TOTAL_FEE}}</span></p>
                                </td>
                                <td class="center-text">{{GetOrderStatus(d.rows[i].ORDER_STATUS)}}</td>
                                <td class="car-info">
                                 <p>备注：<span>{{d.rows[i].ORDER_EXPIRE}}</span></p>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    {{#} }}
                  </xmp>
                <div id="divPage">
                </div>
            </div>
        </div>

        <%--chat--%>
        <script src="/themes/wStyle1/js/Chat/lib.js"></script>
        <script src="/themes/wStyle1/js/Chat/layim.js"></script>

        <!--start JS引用-->
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>
        <script src="/themes/wStyle1/js/comm/jsPagination.js"></script>

        <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
        <script src="/jqPlugin/layer/layer.min.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>

        <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
        <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
        <script src="/themes/wStyle1/js/comm/DateInfo.js"></script>
        <!--end JS引用-->
        <script type="text/javascript">
            function GetOrderStatus(orderStatus) {
                switch (orderStatus) {
                    case 1: return "已付款";
                    case 2: return "已完成";
                    case 3: return "已结算";
                    case 4: return "已退款";
                }
            }

            //获取游客 昵称
            function getNick(name,gender) {
                var nick = name.toString();
                if (nick.length > 5) {
                    nick = gender == "F" ? nick.substring(0, 1) + "先生" : nick.substring(0, 1) + "女士";
                }
                return nick;
            }

            $(function () {
                $("#djackOrderList a").attr("href", "javascript:;");
            })

            var pIndex = 1, ostatus = 0;
            function btnDo(sEbtn) {
                GtGrid1Action = sEbtn;
                var opart = GetGtParam();

                ajaxComm(opart);
            };

            function selectStatus(t, st) {
                $(t).parent().children().removeClass("selected");
                $(t).addClass("selected");

                var tbindex = parseInt($(t).attr("tabindex"));
                $("#sold-boder").attr("style", "left: " + (tbindex * 109) + "px;");

                ostatus = st;
                pIndex = 1;
                btnDo("init");
                layer.load('数据请求中,请稍后', 1);
            }
            //执行AJAX调用时获取参数
            function GetGtParam() {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("pIndex", pIndex);
                _jsParam.AddCell("orderStatus", ostatus);
                _jsParam.AddCell("ACTION", GtGrid1Action);
                return _jsParam;
            };
            btnDo("init");
            function goPage(Index) {
                pIndex = Index;
                btnDo("init");
            }

            //获取订单数量
            function setAllCount(allNum, paidNum, finishNum, compeletNum, refundNum) {
                var wlist = $("#wSlist").children();

                $(wlist).eq(0).find("em").html(allNum);
                $(wlist).eq(1).find("em").html(paidNum);
                $(wlist).eq(2).find("em").html(finishNum);
                $(wlist).eq(3).find("em").html(compeletNum);
                $(wlist).eq(4).find("em").html(refundNum);
            }
        </script>
        <script src="/themes/wStyle1/js/Chat/chatMessage.js"></script>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>
</body>
</html>
